﻿<%@ Page Language="C#" MasterPageFile="~/Main/AdminPage.master" AutoEventWireup="true" CodeFile="PicAddUpdate.aspx.cs" Inherits="Main_PicAddUpdate" Title="图片管理" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div style="text-align:center;">
<div style="width:750px; line-height:35px;">
   <table style="width: 678px; margin:auto; font-size:14px; font-weight:bolder; color:#666; text-align:left; height: 230px;">
                <tr>
                    <td style="width: 191px">
                        图片类型：</td>
                    <td colspan="2">
                        <asp:DropDownList ID="ddltype" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddltype_SelectedIndexChanged">
                            <asp:ListItem Value="-1">--请选择--</asp:ListItem>
                            <asp:ListItem Value="0">店面</asp:ListItem>
                            <asp:ListItem Value="1">楼盘</asp:ListItem>
                        </asp:DropDownList>
                     </td>
                </tr>
                <tr>
                    <td style="width: 191px">
                        店面楼盘：</td>
                    <td colspan="2">
                     <asp:DropDownList ID="ddldata" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddldata_SelectedIndexChanged">
                         <asp:ListItem Value="0">--请选择--</asp:ListItem>
            </asp:DropDownList>
                     </td>
                </tr>
                <tr>
                    <td style="width: 191px">
                        图片名称或描述：</td>
                    <td colspan="2">
                        <asp:TextBox ID="txttitle" runat="server" Width="400px"></asp:TextBox>
                     </td>

                   
                </tr>
                <tr>
                    <td style="width: 191px">
                        上传添加图片：</td>
                    <td style="width: 70px">
                        <asp:FileUpload ID="FileUpimg" runat="server" /></td>
                    <td style="width: 104px">
                        <asp:Button ID="btnimgup" runat="server" Text="上传" OnClick="btnimgup_Click" /></td>
                </tr>
                <tr>
                    <td colspan="3">
                        &nbsp;</td>
                </tr>
            </table></div>
        <asp:GridView ID="gvpic" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="Pid" 
            OnPageIndexChanging="gvpic_PageIndexChanging" OnRowCommand="gvpic_RowCommand" 
            PageSize="20" Width="680px" onrowdatabound="gvpic_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="图片">
                    <ItemTemplate>
                        <asp:HiddenField ID="hfpid" runat="server" Value='<%# Eval("Pid") %>' />
                        <asp:ImageButton ID="imgbt" runat="server" Height="80px" 
                            ImageUrl='<%# Eval("Purl") %>' Width="100px" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Purl" HeaderText="路径" />
                <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbdelete" runat="server" 
                            CommandArgument='<%# Eval("Pid") %>' CommandName="del">删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle CssClass="FooterStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <PagerStyle CssClass="PagerStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <SelectedRowStyle CssClass="SelectedRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <HeaderStyle CssClass="HeaderStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
            <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <AlternatingRowStyle CssClass="AlternatingRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:GridView>
        </div>
</asp:Content>

